<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label for="sn" class="control-label col-xs-12 col-sm-2"><i class="text-muted">*</i>订单号:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="c-sn" value="{$row.sn}" disabled="true" />
        </div>
    </div>


    <div class="form-group">
        <label for="c-uid" class="control-label col-xs-12 col-sm-2"><i class="text-muted">*</i>所属用户:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-uid" type="text" data-multiple="false" data-source="{:url('/user/admin.index/selectpage')}" data-search-field="nickname" data-show-field="nickname" data-key-field="id" data-select-to-close-list="false" class="form-control selectpage" data-auto_fill_result="false" data-auto-select-first="false" name="row[uid]" value="{$row['uid'] ? $row['uid'] : ''}" placeholder="关联所属用户">
        </div>
    </div>

    <div class="form-group">
        <label for="c-realname" class="control-label col-xs-12 col-sm-2"><i class="text-muted">*</i>客户姓名:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="c-realname" name="row[realname]" value="{$row.realname}" />
        </div>
    </div>



    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2">客户电话:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="c-mobile" name="row[mobile]" value="{$row.mobile}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="c-product_id" class="control-label col-xs-12 col-sm-2">产品名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="c-product_id" value="{$row.product.name}" data-rule="required" disabled/>
        </div>
    </div>
    <div class="form-group">
        <label for="c-customer_id" class="control-label col-xs-12 col-sm-2">客户经理:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-customer_id" type="text" data-multiple="false" data-source="{:url('/user/admin.customer/selectpage')}" data-search-field="customer_realname" data-show-field="customer_realname" data-key-field="id" data-select-to-close-list="false" class="form-control selectpage" data-auto_fill_result="false" data-auto-select-first="false" name="row[customer_id]" value="{$row['customer_id'] ? $row['customer_id'] : ''}" placeholder="关联所属客户经理">
        </div>
    </div>
    <div class="form-group">
        <label for="c-distributor_id" class="control-label col-xs-12 col-sm-2">分销商:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-distributor_id" type="text" data-multiple="false" data-source="{:url('/user/admin.distributor/selectpage')}" data-search-field="nickname" data-show-field="nickname" data-key-field="id" data-select-to-close-list="false" class="form-control selectpage" data-auto_fill_result="false" data-auto-select-first="false" name="row[distributor_id]" value="{$row['distributor_id'] ? $row['distributor_id'] : ''}" placeholder="关联所属经销商">
        </div>
    </div>

    <div class="form-group">
        <label for="c-create_time" class="control-label col-xs-12 col-sm-2">申请时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-create_time" type="text" class="form-control datetimepicker" value="{:date('Y-m-d H:i:s', $row['create_time'])}">
        </div>
    </div>

    <div class="form-group">
        <label for="c-reserve_time" class="control-label col-xs-12 col-sm-2">首次抢单时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reserve_time" type="text" class="form-control datetimepicker" value="{:date('Y-m-d H:i:s', $row['reserve_time'])}">
        </div>
    </div>

    <div class="form-group">
        <label for="c-update_time" class="control-label col-xs-12 col-sm-2">最后更新时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-update_time" type="text" class="form-control datetimepicker" value="{:date('Y-m-d H:i:s', $row['update_time'])}">
        </div>
    </div>


    <div class="form-group">
        <label for="c-stage" class="control-label col-xs-12 col-sm-2"><i class="text-muted">*</i>阶段:</label>
        <div class="col-xs-12 col-sm-3">
            {:build_select('row[stage]', config('product.product_order_field_stage'), $row['stage'], ['class'=>'form-control selectpicker', 'required'=>''])}
        </div>
    </div>
    <div class="form-group">
        <label for="c-status" class="control-label col-xs-12 col-sm-2">状态:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', config('product.product_order_field_status'),$row['status'])}
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <div class="col-xs-2"></div>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed ">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>